from selenium.webdriver.common.by import By

from base import BaseAction


class FactoryPageHome(BaseAction):
    order_management_ele = By.XPATH, '//*[text()="订单管理"]'
    search_ele1 = By.XPATH, '//*[@id="app"]/div/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div[3]/div/div/div[6]/input'  # 点击筛选
    search_ele2 = By.XPATH, '//p//*[text()="工厂待接收"]'
    search_ele3 = By.XPATH, '//*[text()="查询"]'
    order_one_ele = By.XPATH, '//*/tbody/tr[1]//span[text()="接收病例"]'
    order_receive_ele = By.XPATH, '//*[text()="接收"]'
    order_receive_success_ele = By.XPATH, '//*[text()="接收成功"]'
    come_back_ele = By.XPATH, '//*[text()="返回DX平台"]'

    def get_order_management_ele(self):
        return self.get_element(self.order_management_ele)

    def get_search_ele1(self):
        return self.get_element(self.search_ele1)

    def get_search_ele2(self):
        return self.get_element(self.search_ele2)

    def get_search_ele3(self):
        return self.get_element(self.search_ele3)

    def get_order_one_ele(self):
        return self.get_element(self.order_one_ele)

    def get_order_receive_ele(self):
        return self.get_element(self.order_receive_ele)

    def get_order_receive_success_ele(self):
        return self.get_element(self.order_receive_success_ele)

    def get_come_back_ele(self):
        return self.get_element(self.come_back_ele)
